//1、导入request方法，它封装了axios
import request from "@/network/request";
//当前api的url路径前置
let model = "user"

//封装当前模块的api对象
let userApi = {
    getUserById: function (id) {
        return request({
            url: `${model}/getUserById`,
            method: "get",
            params: {"id": id}
        })
    },
    doLogin: function (params) {
        return request({
            url: `/login`,
            method: "post",
            params: params
        })
    }
}

//导出当前模块的api对象
export default userApi;